package org.lc.stk.model.paper;

import org.hibernate.annotations.Comment;
import org.lc.stk.model.question.Question;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

/**
 * 试卷上题目属性，和具体的某一张试卷上的某一题关联
 */
@Entity
@Table(name = "examPaperQuestion")
@Comment("试卷上题目，包括在试卷中的属性，和具体的某一张试卷上的某一题关联")
public class ExamPaperQuestion {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    /**
     * 分值
     */
    @Column
    @Comment("分值")
    private Float score;

    @ManyToOne
    @Comment("题目")
    private Question question;

    /**
     * 在大题中的顺序
     */
    @Comment("在大题中的顺序")
    @Column(name = "[order]")
    private int order;

    /**
     * 针对选择题，自定义排序用, 1:2:4:5:3，默认为0
     */
    @Column
    @Comment("针对选择题，自定义排序用, 1:2:4:5:3，默认为0")
    private String optionSequence;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public String getOptionSequence() {
        return optionSequence;
    }

    public void setOptionSequence(String optionSequence) {
        this.optionSequence = optionSequence;
    }
}
